{extend name='admin@main'}

{block name="button"}
<button data-open='{:url("form_schooladmin")}?school_id={$school_id}' data-title="添加管理员" class='layui-btn layui-btn-sm layui-btn-primary'>添加管理员</button>
<button data-action='{:url("del_schooladmin")}' data-rule="schooladmin_id#{key};school_id#{$school_id}" class='layui-btn layui-btn-sm layui-btn-primary'>删除管理员</button>
{/block}

{block name="content"}
<table class="layui-table" lay-skin="line">
    <h2>学校名称: {$school_name}</h2>
    <a  style="margin-left: 30px;color: #333" title="刷新" href="javascript:window.location.reload()"><i class="layui-icon layui-icon-refresh-3"></i></a>
    <button class="layui-btn layui-btn-danger layui-btn-sm" style="float: left;" type='button' onclick="window.history.go(-1)">返回学校列表</button>
</div>
    <!--{notempty name='list'}-->
    <thead>
    <tr>
        <th class='list-table-check-td think-checkbox'>
            <input data-auto-none data-check-target='.list-check-box' type='checkbox'>
        </th>
        <th class='text-center nowrap'>管理员账号</th>
        <th class="text-center nowrap">操作</th>
    </tr>
    </thead>
    <!--{/notempty}-->
    <tbody>
    <!--{foreach $list as $key=>$vo}-->
    <tr >
        <td class='list-table-check-td think-checkbox'>
            <input class="list-check-box" value='{$vo.id}' type='checkbox'>
        </td>
        <td class='text-center nowrap' data-dbclick>
            {$vo.username|default=''}
        </td>
        <td class='text-center nowrap '>
            <div class="nowrap nowrap margin-bottom-5">
                <a  data-title="编辑" class="layui-btn layui-btn-sm" data-open='{:url("form_schooladmin")}?school_user_id={$vo.id}&school_id={$school_id}'>编 辑</a>
                <a class="layui-btn layui-btn-sm layui-btn-danger" data-confirm="确定要删除数据吗?" data-action="{:url('del_schooladmin')}" data-value="school_user_id#{$vo.id};school_id#{$school_id}">删 除</a>
            </div>
        </td>
    </tr>
    <!--{/foreach}-->
    </tbody>
</table>

{empty name='list'}<span class="notdata">没有记录哦</span>{else}{$pagehtml|raw|default=''}{/empty}

{/block}